<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>文化馆</title>
    <link rel="stylesheet" href="../css/ext/bootstrap.min.css">
    <link rel="stylesheet" href="../css/ext/webuploader.css">
    <link rel="stylesheet" href="../css/ext/diyUpload.css">
    <link rel="stylesheet" href="../css/common/base.css">
    <link rel="stylesheet" href="../css/information/information.css">
    <script src="../js/ext/jquery-1.11.3.js"></script>
    <script src="../js/ext/bootstrap.min.js"></script>
    <script src="../js/ext/webuploader.html5only.min.js"></script>
    <script src="../js/ext/diyUpload.js"></script>
    <script src="../js/base.js"></script>
    <script src="../js/ext/uploadPreview.js"></script>
    <script src="../js/information/information.js"></script>
</head>
<body>
<% include ../common/header.jsp %>
<div class="main">
    <% include ../common/menu.jsp %>
    <div class="main-content">
        <div class="wrapper">
            <!--title-->
            <div class="content-title">
                <!--面包屑-->
                <ol class="breadcrumb">
                    <li>资讯管理</li>
                    <li class="active">编辑</li>
                </ol>
            </div>
            <!--表单-->
            <form action="" method="post" enctype="multipart/form-data">
                <div class="form-list">
                    <label><i class="ic ic-dotred"></i>标题图片</label>
                    <div class="img-ext">
                        <div id="imgdiv" class="image-preview">
                            <img style="width: 400px;height: 244px" id="imgShow" src=""/>
                        </div>
                        <div class="filebtn">
                            <a class="btn btn-upimg" href="javascript:;"><span>上传图片</span></a>
                            <em>图片大小为540*320</em>
                            <input type="file" id="up_img" name="">
                        </div>
                    </div>
                </div>
                <div class="form-list">
                    <label style="padding: 0" class="l80"><i class="ic ic-dotred"></i>名称</label>
                    <input id="name" class="i280" type="text" name="" maxlength="20">
                    <em>不超过20个字符，可由中英文数字及中英文符号组成</em>
                </div>
                <div class="form-list">
                    <label><i class="ic ic-dotblue"></i>背景图片</label>
                    <div class="img-ext">
                        <div id="img-bg" class="image-preview">
                            <img style="width: 160px;height: 120px" id="imgbgShow" src=""/>
                        </div>
                        <div class="filebtn">
                            <a class="btn btn-upimg" href="javascript:;"><span>上传图片</span></a>
                            <input type="file" id="up_img_bg" name="">
                        </div>
                    </div>
                </div>
                <div class="form-list">
                    <label><i class="ic ic-dotblue"></i>内容图片</label>
                    <div id="img-content">
                        <div id="test" ></div>
                    </div>
                </div>
                <!--文本编辑器-->
                <div class="form-list editor">
                    <label style="padding: 0" class="l80"><i class="ic ic-dotred"></i>内容</label>
                    <!-- 加载编辑器的容器 -->
                    <script id="editor" name="content" type="text/plain" style="width:700px;height:300px;"></script>
                    <!-- 配置文件 -->
                    <script type="text/javascript" src="../js/ext/ueditor/ueditor.config.js"></script>
                    <!-- 编辑器源码文件 -->
                    <script type="text/javascript" src="../js/ext/ueditor/ueditor.all.js"></script>
                    <!-- 实例化编辑器 -->
                    <script type="text/javascript">
                        var ue = UE.getEditor('editor', {
                            autoHeightEnabled: false,
                        });
                    </script>
                    <em style="margin-left: 88px"><i class="ic ic-warn"></i>内容不能为空</em>
                </div>
                <div style="margin-left: 88px">
                    <input class="btn btn-submit" type="submit" value="提交">
                    <a class="btn btn-cancel" style="margin-left: 40px"><span>取消</span></a>
                </div>
            </form>
        </div>
    </div>
</div>
<script>
$(function(){
    $(document).submit(function () {
        check_imgTitle();
        check_name();
        check_ueditor();
        return false;
    })
})
</script>
</body>
</html>